package com.sz.common.core.service;

import com.sz.common.core.service.role.MembershipType;
import com.sz.common.core.service.AbstractPrincipal;

/**
 * Function: MockPrincipal <br>
 * Author: Charles <br>
 * Date: 2017-01-20 17:13:00
 */
public class MockPrincipal extends AbstractPrincipal {

    public MockPrincipal(int domainId, int accountId, String accountName) {
        super(domainId,accountId,accountName);

        this.setPreferredLanguage("zh-CN");
    }

    @Override
    public MembershipType getMembershipType() {
        return MembershipType.USER;
    }

    @Override
    protected void loadRoles() {

    }

    @Override
    protected void loadPermissions() {

    }

    @Override
    public boolean isRoot() {
        return true;
    }

    @Override
    public boolean isAdmin() {
        return false;
    }
}
